<?php

namespace ctrl;

use common\Ctrl;
use model\images;
use libs\view;

class image extends ctrl
{
	static function init()
	{
		\model\visits::insertData(); //用户访问记录 写入记数
	}

	public static function index()
	{
		if (!isset($_GET['id']) & empty($_GET['id']) & empty(ROUTE['params']['id'])) {
			return  parent::_404();
		}

		$images = images::selectImageData();

		view::assign('images', $images);
		view::Display();
	}
}
